import 'package:flutter/material.dart';
import 'package:spring_dict/Events/index.dart';
import 'package:spring_dict/UI/MainPage.dart';
import 'package:spring_dict/global.dart';
import 'package:flutter_statusbar_manager/flutter_statusbar_manager.dart';

void main(){

  applyLogger();

  try {
    FlutterStatusbarManager.setColor(Colors.transparent);
    FlutterStatusbarManager.setNavigationBarColor(primaryColor);
  }
  catch (exception){
    log(exception, context: "StatusbarManager");
  }

  initEvents();

  globalBus.publish(ON_APP_BOOT, true);

  runApp(
      MaterialApp(
        home: MainPage(),
        theme: ThemeData(
          fontFamily: "ukij",
          primaryColor: primaryColor,
          accentColor: primaryColor
        ),
      )
  );
}
